package KASystem;

import java.io.Serializable;

/**
 *
 * @author DJH
 */
class Company implements Serializable {

    private String name;
    private String phone;

    /**
     * constructor tekur parametur av navninum hjá company
     *
     * @param name
     */
    public Company(String name) {
        this.name = name;
        phone = "";
    }

    public Company(String name, String phone) {
        this.name = name;
        this.phone = phone;
    }

    /**
     * methode(accesor) sum returnerar navni hjá company
     *
     * @return name
     */
    public String getName() {
        return name;
    }

    public String getPhone() {
        return phone;
    }

    /**
     * overwrite toString methodina, so at hon returnerar bara name
     *
     * @return name
     */
    public String toString() {
        return name;
    }
}
